<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/16 0016
 * Time: 下午 1:32
 */
namespace app\index\validate;

use think\Validate;
class Vlogin extends Validate{
    protected $rule=[
        'email' =>  'require|email',
        'password'  =>  'require|min:6',
    ];
    protected $message = [
        'password.min'=>'密码不能少于6位',
        'password.require'=>'密码不能为空',
        'email.require' =>  '邮箱不能为空',
        'email.email' =>  '邮箱格式错误',
    ];
    protected $scene = [
        'add'   =>  ['email','password'],
        'edit'  =>  ['email'],
    ];
}